<?php defined('IN_ADMIN') or exit('No permission resources.');?>
<?php include $this->admin_tpl('header', 'admin');?>
<script type="text/javascript">
$(document).ready(function() {
	$.formValidator.initConfig({
		formid: "myform",
		autotip: true,
		onerror: function(msg, obj) {
			window.top.art.dialog({
				content: msg,
				lock: true,
				width: '200',
				height: '50'
			})
		}
	});
	$("#name").formValidator({
		onshow: "<?php echo L('input').L('title')?>",
		onfocus: "<?php echo L('input').L('title')?>"
	}).inputValidator({
		min: 1,
		onerror: "<?php echo L('input').L('title')?>"
	});
	/* $("#end_time").formValidator({ onshow: "请输入时间", onfocus: "请输入时间", oncorrect: "输入正确！" }).functionValidator({ fun: allEmpty ,onerror:"结束时间应该不小于开始时间"});
	function allEmpty(val, elem) {
    	var end_time = $('#end_time').val();
    	var begin_time = $('#start_time').val();
    	if (end_time >= begin_time) {
    		return true;
    	}else {
    		return false;
    	}
    }; */
});
</script>
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
	   <a href="./index.php?m=subject_live&c=manage&a=init" style="font-size:14px;color: #0000FF;font-weight:bolder;"><em>返回上一级</em></a>	
	</div>
</div>
<div class="pad-10">

	<form name="myform" action="?m=<?php echo ROUTE_M?>&c=<?php echo ROUTE_C?>&a=<?php echo ROUTE_A?>" method="post"
		id="myform" enctype="multipart/form-data">
		<div class="content pad-10" id="show_div_1" style="height: auto">
			<fieldset>
				<legend>直播信息---添加</legend>
				<table width="100%" class="table_form">
					<tr>
						<td width="200"><?php echo L('title')?>：</td>
						<td><input type="text" name="data[title]" id="name"
							class="input-text" value="" /></td>
					</tr>
					<tr>
						<td width="200"><?php echo L('status')?>：</td>
						<td><?php echo form::select(array('请选择直播状态',1=>'准备中',2=>'启用',3=>'关闭',4=>'删除'), 1,'name="data[status]"')?></td>
					</tr>
					<tr>
						<td width="200"><?php echo L('start_time')?>：</td>
						<td><?php echo form::date('data[start_time]','',1)?></td>
					</tr>
					<tr>
						<td width="200"><?php echo L('end_time')?>：</td>
						<td><?php echo form::date('data[end_time]','',1)?></td>
					</tr>
					<tr>
						<td width="200"><?php echo L('sponsor')?>：</td>
						<td><input type="text" name="data[sponsor]" value=""></td>
					</tr>
					<tr>
						<td width="200"><?php echo L('image_cover')?>：</td>

						<td><?php echo form::images('data[image_cover]', 'image_cover', '', 'subject_live', '', 40)?></td>
					</tr>
					<tr>
						<td width="120"><?php echo L('desc')?>：</td>
						<td><textarea name="data[desc]" id=desc></textarea><?php echo form::editor('desc','full','','','',1,1,'',800,300)?></td>
					</tr>
				</table>
			</fieldset>

		</div>
		<div class="bk15"></div>
		<?php if(ROUTE_M != 'information'){?>
		<input name="dosubmit" type="submit" id="dosubmit"
			value="<?php echo L('submit')?>" class="button">
		<?php }?>

	</form>

</div>
</body>
</html>